/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Usuario
 */

//no saca numeros repetidos
import java.util.Random;
public class BingoCard1 implements IBingoCard {
    //hasta 14 numeros
    
 int[]  bingo = new int[15];
    public BingoCard1() {
       
        Random random = new  Random();
        for(int i =0; i < bingo.length; i++)
        {//para numeros del 1 al 99
            bingo[i]=random.nextInt(100);
            if (isRepeated(i)){
                i--;
            }
            
        }
        
    }

    public int[] getBingo() {
        return bingo;
    }

    public void setBingo(int[] bingo) {
        this.bingo = bingo;
    }

    @Override
    public String toString() {
    
        String s= "[";
        for (int i =0; i< bingo.length; i++){
            s=s+bingo[i]+ " , ";
        }
        
        return s+ "]";
    }

    @Override
  public void syso(){
      System.out.println(this.toString());
  }

    private boolean isRepeated(int i) {
        for(int j=0; j<i; j++){
            if(bingo[i]==bingo[j])
                return true;
        }
        return false;
    }
    
}
